﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Archives.DbContexts
{
    public interface IUnitOfWork : IDisposable
    {
        /// <summary>
        /// 提交并且刷新改变
        /// </summary>
        void CommitAndRefreshChanges();
        /// <summary>
        /// 回滚提交的更改
        /// </summary>
        void RollbackChanges();
        /// <summary>
        /// 数据上下文提交
        /// </summary>
        /// <returns>影响的行数</returns>
        int SaveChanges();
    }
}
